package com.kly.relationship.serviceImpl;

import com.kly.RelationshipTestService;
import com.kly.relationship.db.dao.RelationshipTestDao;
import com.kly.relationship.db.entity.RelationshipTestEntity;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@DubboService
public class RelationshipTestServiceImpl implements RelationshipTestService {
    @Autowired
    private RelationshipTestDao relationshipTestDao;

    @Override
    public String queryByRelationshipId(Long relationshipId) {
        RelationshipTestEntity relationshipTestEntity = relationshipTestDao.selectByPrimaryKey(relationshipId);
        return relationshipTestEntity == null ? null : relationshipTestEntity.getName();
    }
}
